// Copyright 2022 a.o.smith ALL Rights Reserved
package com.liuxinlong.modules.dao.impl;

import com.liuxinlong.modules.dao.UserGroupRelationDao;
import com.liuxinlong.modules.entity.UserGroupRelation;
import com.liuxinlong.modules.mapper.UserGroupRelationMapper;
import com.liuxinlong.modules.system.dto.GroupMember;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * 类描述
 * <p>
 * 此类关联设计的功能
 *
 * @author liuxinlong@hotwater.com.cn
 * @version 1.0.0
 * @since 2022年7月8日
 */
@Service
public class UserGroupRelationDaoImpl extends ServiceImpl<UserGroupRelationMapper, UserGroupRelation> implements UserGroupRelationDao {

    @Override
    public List<GroupMember> pageGroupMemberList(Map<String, Object> queryParam) {
        return baseMapper.pageGroupMemberList(queryParam);
    }

    @Override
    public int getGroupMemberCount(Map<String, Object> queryParam) {
        return baseMapper.getGroupMemberCount(queryParam);
    }

    @Override
    public void deleteByUserIds(String groupId, Set<String> userList) {
        baseMapper.deleteByUserIds(groupId,userList);
    }

    @Override
    public void deleteByUserId(String userId) {
        baseMapper.deleteByUserId(userId);
    }

    @Override
    public List<UserGroupRelation> queryRelationByUserId(String userId) {
        return baseMapper.queryRelationByUserId(userId);
    }

    @Override
    public UserGroupRelation queryRelationByInfo(String userId, String groupId) {
        return baseMapper.queryRelationByInfo(userId,groupId);
    }

    @Override
    public void deleteByUserIdList(List<String> userIdList) {
        baseMapper.deleteByUserIdList(userIdList);
    }

}
